﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using sorochinska_kl.Models;

namespace sorochinska_kl.Controllers
{
    public class HRController : Controller
    {

        private UsersContext db = new UsersContext();

        //
        // GET: /HR/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult UserWithOutProfile()
        {
            var u = from pr in db.UserProfiles
                    where !db.Employees.Any(empl => (empl.UserId == pr.UserId))
                    select pr;
            List<UserProfile> uList = u.ToList<UserProfile>(); 
                    
            return View(uList);
        }
    }
}
